import cv2

def imggray(filename,mode):
    gray = cv2.cvtColor(filename,mode)
    return gray

def img01(filename,mode,thmin,thmax,thmode):
    gray = cv2.cvtColor(filename,mode)
    _,binary = cv2.threshold(gray,thmin,thmax,thmode)
    return binary

def shortshow(namelist):
    namelistlong = len(namelist)
    for i in range(namelistlong):
        cv2.imshow(str(namelist[i]),namelist[i])